//loading
function loadingfun(){
	//实例化一个预加载资源的对象
	var queue = new createjs.LoadQueue();
	//设置加载的资源
	queue.loadManifest([
		{"id":1,"src":"img/index/bg1.png"},
		{"id":2,"src":"img/index/shanzi.png"},
		{"id":3,"src":"img/index/tit.png"},
		{"id":4,"src":"img/index/body.png"},
		{"id":5,"src":"img/index/header.png"},
		{"id":6,"src":"img/index/play.png"},
		{"id":7,"src":"img/over/gg.png"},
		{"id":8,"src":"img/over/num.png"},
		{"id":9,"src":"img/yx/bj.png"},
		{"id":10,"src":"img/yx/cxd.png"},
		{"id":11,"src":"img/yx/dhd.png"},
		{"id":12,"src":"img/yx/fshu.png"},
		{"id":13,"src":"img/yx/prop1.png"},
		{"id":14,"src":"img/yx/prop2.png"},
		{"id":15,"src":"img/yx/prop3.png"},
		{"id":16,"src":"img/yx/prop4.png"},
		{"id":17,"src":"img/yx/prop5.png"},
		{"id":18,"src":"img/yx/prop6.png"},
		{"id":19,"src":"img/yx/prop7.png"},
		{"id":20,"src":"img/yx/yun.png"},
		{"id":21,"src":"img/Mc_share.png"},
		{"id":22,"src":"img/img.png"}
	])
	queue.on("complete",function(res){//加载完成触发
		$(".loading").css("display","none");
		$(".indexWrap").css("display","block");
	})
	queue.on("progress",function(res){//加载资源过程中触发
		let num = Math.ceil(res.progress*100);
		$(".Img").css("left",num-10+"%");
		$(".loadNum").text(num+"%");
	})
}

loadingfun();//loading
function loadingfun(){
	//实例化一个预加载资源的对象
	var queue = new createjs.LoadQueue();
	//设置加载的资源
	queue.loadManifest([
		{"id":1,"src":"img/index/bg1.png"},
		{"id":2,"src":"img/index/shanzi.png"},
		{"id":3,"src":"img/index/tit.png"},
		{"id":4,"src":"img/index/body.png"},
		{"id":5,"src":"img/index/header.png"},
		{"id":6,"src":"img/index/play.png"},
		{"id":7,"src":"img/over/gg.png"},
		{"id":8,"src":"img/over/num.png"},
		{"id":9,"src":"img/yx/bj.png"},
		{"id":10,"src":"img/yx/cxd.png"},
		{"id":11,"src":"img/yx/dhd.png"},
		{"id":12,"src":"img/yx/fshu.png"},
		{"id":13,"src":"img/yx/prop1.png"},
		{"id":14,"src":"img/yx/prop2.png"},
		{"id":15,"src":"img/yx/prop3.png"},
		{"id":16,"src":"img/yx/prop4.png"},
		{"id":17,"src":"img/yx/prop5.png"},
		{"id":18,"src":"img/yx/prop6.png"},
		{"id":19,"src":"img/yx/prop7.png"},
		{"id":20,"src":"img/yx/yun.png"},
		{"id":21,"src":"img/Mc_share.png"},
		{"id":22,"src":"img/img.png"},
		{"id":23,"src":"music/Sound_bg.mp3"},
		{"id":24,"src":"music/defen.mp3"},
		{"id":25,"src":"music/gameover.mp3"},
		{"id":26,"src":"music/jump.mp3"},
		{"id":27,"src":"music/shuaijiao.mp3"}
	])
	queue.on("complete",function(res){//加载完成触发
		$(".loading").css("display","none");
		$(".indexWrap").css("display","block");
	})
	queue.on("progress",function(res){//加载资源过程中触发
		let num = Math.ceil(res.progress*100);
		$(".Img").css("left",num-10+"%");
		$(".loadNum").text(num+"%");
	})
}

loadingfun();